//
// Created by wuzhe on 2022/4/18.
//

#include "PlayerState.h"

PlayerState::PlayerState(Player &player1, PLAYER_STATUS playerStatus):player(player1),playerStatus(playerStatus){
    if (this->player.playerState != nullptr) {
        delete this->player.playerState;
    }
    this->player.playerState = this;
};

PlayerState* PlayerState::getAck() {
    return nullptr;
}

PlayerState* PlayerState::getERR() {
    return nullptr;
}

PlayerState* PlayerState::getEnter() {
    player.sendErr();
    return nullptr;
}

PlayerState* PlayerState::getExit() {
    player.space.onExit(&player);
    return nullptr;
}

PlayerState* PlayerState::getCreateRoom(std::string roomName) {
    player.sendErr();
    return nullptr;
}

PlayerState * PlayerState::getEnterRoom(int i) {
    player.sendErr();
    return nullptr;
}

PlayerState* PlayerState::getDelRoom() {
    player.sendErr();
    return nullptr;

}

PlayerState * PlayerState::getExitRoom(int i) {
    player.sendErr();
    return nullptr;
}

PlayerState* PlayerState::getCreateRole(std::string roleName) {
    player.sendErr();
    return nullptr;
}

PlayerState * PlayerState::getTalk(std::string) {
    player.sendErr();
    return nullptr;
}

